package com.tang.design.single;

/**
 * @author tmh
 * @date 2024/6/4 21:15
 * @description 饿汉式--线程安全
 */
public class HungrySingle {
    //静态变量
    public static HungrySingle instance =  new HungrySingle();
    //私有构造方法
    private HungrySingle(){}

    //全局访问点
    public static HungrySingle getInstance(){
        return instance;
    }

}
